"""import random
n=0
b_1,b_2,b_3,b_4,b_5,b_6=0,0,0,0,0,0
a_1=random.randint(1,10)
a_2=random.randint(1,10)
a_3=a_2+a_1
a_4=int(input(f"{a_1}+{a_2}=?"))
if a_3==a_4:
    print("你是对的")
    n=n+10
    b_1+=a_3
    a_1=random.randint(1,100)
    a_2=random.randint(1,100)
    a_3=a_1+a_2
    a_4=int(input(f"{a_1}+{a_2}=?"))
    if a_4==a_3:
        print("你是对的")
        n=n+10
        b_2+=a_3
        a_1=random.randint(1,1000)
        a_2=random.randint(1,1000)
        a_3=a_1+a_2
        a_4=int(input(f"{a_1}+{a_2}=?"))
        if a_4==a_3:
            print("你是对的")
            n=n+10
            b_3+=a_3
        else:
            print("你是错的")
    else:
        print("你是错的")
else:
    print("你是错的")
a_1=random.randint(10,20)
a_2=random.randint(1,10)
a_3=a_1-a_2
a_4=int(input(f"{a_1}-{a_2}=?"))
if a_3==a_4:
    print("你是对的")
    n=n+10
    b_4+=a_3
    a_1=random.randint(100,200)
    a_2=random.randint(1,100)
    a_3=a_1-a_2
    a_4=int(input(f"{a_1}-{a_2}=?"))
    if a_3==a_4:
        print("你是对的")
        n=n+10
        b_5+=a_3
        a_1=random.randint(1000,2000)
        a_2=random.randint(1,1000)
        a_3=a_1-a_2
        a_4=int(input(f"{a_1}-{a_2}=?"))
        if a_3==a_4:
            print("你是对的")
            n=n+10
            b_6+=a_3
        else:
             print("你是错的")
    else:
        print("你是错的")
else:
    print("你是错的")
print(f"IQ{n}")
print(f"答案是 {b_1,b_2,b_3,b_4,b_5,b_6}")"""
import random
c,c1,c2=0,9,10
t=True
while t:
    a1,a2=random.randint(c1,c2),random.randint(c1,c2)
    a3=a1+a2
    a4=int(input(f"{a1}+{a2}={a3} "))
    if a4==a3:
        c+=1
        c1=c1*2
        c2=c2*2
    else:
        t=False
t=True
c1,c2,c3=0,10,0
while t:
    a1,a2=random.randint(c1,c2),random.randint(c1,c2)
    a3=a1-a2
    a4=int(input(f"{a1}-{a2}={a3} "))
    if a4==a3:
        c3+=1
        c1=c1*2
        c2=c2*2
    else:
        t=False
t=True
c1,c2,c4=0,10,1
while t:
    a1,a2=random.randint(c1,c2),random.randint(c1,c2)
    a3=a1*a2
    a4=int(input(f"{a1}*{a2}={a3} "))
    if a4==a3:
        c4+=1
        c1=c1*2
        c2=c2*2
    else:
        t=False
t=True
c1,c2,c5=0,10,1
while t:
    a1,a2=random.randint(c1,c2),random.randint(c1,c2)
    a3=int(a1/a2)
    a4=int(input(f"{a1}/{a2}={a3} "))
    if a4==a3:
        c5+=1
        c1=c1*10
        c2=c2*2
    else:
        t=False
print(c,c3,c4,c5)